import { dynamicRouter, staticstateRoutes } from '@/router'
const state = {
  router: []
}
const mutations = {
  routerList(state, routers) {
    state.router = [...staticstateRoutes, ...routers]
  }
}
const actions = {
  RouterFilter(store, routerList) {
    const res = dynamicRouter.filter(item => routerList.includes(item.name))
    store.commit('routerList', res)
    return res
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
